cmake_minimum_required(VERSION 3.22.1)
project(homework1)

set(CMAKE_CXX_STANDARD 17)

add_executable(homework1 src/main.cpp
        src/RangePartition.cpp
        src/RangePartition.h
        src/RangePartitionMatcher.h
        src/RangePartitionMatcherDemo.cpp
        src/RangePartitionMatcherDemo.h)
        
add_executable(homework1_tests
 		test/RangePartitionMatcherTest.cpp
 		src/RangePartition.cpp
 		src/RangePartitionMatcherDemo.cpp)
 		
target_link_libraries(homework1_tests
			gtest
			gtest_main)
			
target_include_directories(homework1_tests PUBLIC
	${CMAKE_CURRENT_SOURCE_DIR}/src)
	
enable_testing()
add_test(NAME RangePartitionTests COMMAND homework1_tests)
